#pragma once
#include "CDependencyObject.h"
class CNoParentShareableDependencyObject :
	public CDependencyObject
{
protected: 
	CNoParentShareableDependencyObject(const CNoParentShareableDependencyObject & original, HRESULT & hr);
	CNoParentShareableDependencyObject(CCoreServices * pCore);
public: 
	CNoParentShareableDependencyObject();
	virtual XBOOL IsActive();
	virtual void SetAssociated(XBOOL fIsAssociated);
	XUINT32 GetSharingCount();
	virtual XBOOL DoesAllowMultipleAssociation();
	virtual XBOOL ParticipatesInManagedTreeInternal();
	virtual HRESULT Enter(CDependencyObject * pNamescopeOwner, struct EnterParams params);
	virtual HRESULT Leave(CDependencyObject * pNamescopeOwner, struct LeaveParams params);
	virtual XBOOL CanEnter(CDependencyObject * pNamescopeOwner);
	virtual XBOOL ShouldSharedObjectRegisterName(CResourceDictionary * pParentResourceDictionary);
	virtual XUINT32 GetTypeIndex() const;
	virtual HRESULT Clone(CNoParentShareableDependencyObject * * ppClone);
	XBOOL IsClone();
	virtual void VisitImpl(TreeVisitor * pVisitor);
	virtual HRESULT HasParent(CDependencyObject * pCandidate, XBOOL * pfCandidateIsParent);
private: 
	void Initialize();

	XUINT32 m_cShares;
	XBOOL m_fIsClone;
	XUINT32 m_cEnteredLive;
};

